import { http } from "@/utils/http";
import { baseUrlApi } from './utils'

// // 测试接口
// export const getDevice = (data) => {
//   return http.request('get', baseUrlApi('/device/info'), { data });
// };

// // 测试接口 params传参
// export const getTest = (params) => {
//   return http.request("get", baseUrlApi('/menu/role-menusandchecked'), { params });
// };

// 获取设备产品服务列表
export const getDeviceList = () => {
  return http.request("get", baseUrlApi('/device/show/1'));
};

// 添加协议配置
export const addDevice = (data) => {
  return http.request("post", baseUrlApi('/device/add'),{ data });
};

// 删除配置协议
export const deleteDeviceInfo = (data) => {
  return http.request("post", baseUrlApi('/device/delete'),{ data });
};

// 获取资源类型列表
export const getDeviceData = (params) => {
  return http.request("get", baseUrlApi('/device/shows/') + params.deviceType + '/' + params.deviceName);
};

// 添加设备产品服务
export const addDeviceList = (data) => {
  return http.request("post", baseUrlApi('/device/edit'),{ data });
};

// 修改
export const modifyDeviceList = (data) => {
  return http.request("post", baseUrlApi('/device/save'),{ data });
};

// 采集设置
export const collectSet = (data) => {
  return http.request("post", baseUrlApi('/device/save'),{ data });
};

